package com.ouc.openplatform.pampas;

import net.sf.ehcache.CacheException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cache.ehcache.EhCacheManagerFactoryBean;
public class EhcacheManagerFactoryBeanProxy extends EhCacheManagerFactoryBean
{
  protected final Logger logger = LoggerFactory.getLogger(EhcacheManagerFactoryBeanProxy.class);
  private boolean cacheFlag = true;
  
  public void afterPropertiesSet() throws CacheException
  {
    if (!this.cacheFlag)
    {
      this.logger.warn("************ehcache不可用************");
      return;
    }
    super.afterPropertiesSet();
  }
  
  public boolean isCacheFlag()
  {
    return this.cacheFlag;
  }
  
  public void setCacheFlag(boolean cacheFlag)
  {
    this.cacheFlag = cacheFlag;
  }
}
